package syllabus.service.impl;

import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import syllabus.dao.PGroupPermissionMapper;
import syllabus.model.Criteria;
import syllabus.model.PGroupPermission;
import syllabus.service.PGroupPermissionService;

@Service
public class PGroupPermissionServiceImpl implements PGroupPermissionService {
    @Autowired
    private PGroupPermissionMapper pGroupPermissionMapper;

    private static final Logger logger = LoggerFactory.getLogger(PGroupPermissionServiceImpl.class);

    public int countByExample(Criteria example) {
        int count = this.pGroupPermissionMapper.countByExample(example);
        logger.debug("count: {}", count);
        return count;
    }

    public PGroupPermission selectByPrimaryKey(Integer id) {
        return this.pGroupPermissionMapper.selectByPrimaryKey(id);
    }

    public List<PGroupPermission> selectByExample(Criteria example) {
        return this.pGroupPermissionMapper.selectByExample(example);
    }

    public int deleteByPrimaryKey(Integer id) {
        return this.pGroupPermissionMapper.deleteByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(PGroupPermission record) {
        return this.pGroupPermissionMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(PGroupPermission record) {
        return this.pGroupPermissionMapper.updateByPrimaryKey(record);
    }

    public int deleteByExample(Criteria example) {
        return this.pGroupPermissionMapper.deleteByExample(example);
    }

    public int updateByExampleSelective(PGroupPermission record, Criteria example) {
        return this.pGroupPermissionMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(PGroupPermission record, Criteria example) {
        return this.pGroupPermissionMapper.updateByExample(record, example);
    }

    public int insert(PGroupPermission record) {
        return this.pGroupPermissionMapper.insert(record);
    }

    public int insertSelective(PGroupPermission record) {
        return this.pGroupPermissionMapper.insertSelective(record);
    }
}